home *** CD-ROM | disk | FTP | other *** search
- # Telalink Login.cmd for Trumpet Winsock
- #
- #
- %ok = [load $phone]
- %ok = [load $passwd]
- %ok = [load $username]
- %ok = [load $isdnvar]
- %ok = [load $isdnphone]
- %ok = [load $isdninit]
- %ok = [load $modeminit]
- # This script (c) Copyright 1996 Tom Godbold & The Telalink Corporation
- # All Rights Reserved
- # set up dial string - isdn or standard
- display \n\n\n\n"< Login to Telalink Command Script Now Running >"\n
- if lower (copy ($isdnvar,1,1)) = "y"
- $dialstring = "ATD " + $isdnphone
- else
- $dialstring = "ATDT " + $phone
- end
- #
- %attempts = 10
- display \n"< Checking your modem >"\n
- output "at"\13
- if ! [input 10 OK\n]
- display \n\n
- display "*************************************************************************"\n
- display "** Your Modem is not responding. This could be due to the fact that: **"\n
- display "** **"\n
- display "** 1) Your modem is turned off **"\n
- display "** 2) This program is not checking the correct COM port **"\n
- display "** **"\n
- display "*************************************************************************"\n
- display \n\n
- display "Here are some things to check:"\n\n
- display " 1. Be sure that your modem is plugged in and the power switch is ON."\n
- display " 2. Be sure that this program is set to check the proper COM port."\n
- display " To do this, click File (above) and click Setup (the first option)."\n
- display " Change the SLIP PORT setting to the number that corresponds to the port"\n
- display " that your modem is connected to (i.e. COM2 = SLIP PORT 2)."\n
- display " Note: You must quit this program and reload it after making this change."\n\n
- abort
- end
- #
- display \n"< Modem connected properly >"\n
- # if bitsurfer, send this
- if lower (copy ($isdnvar,1,1)) = "y"
- output $isdninit\13
- input 10 OK
- else
- # else send a standard modem init string
- display "< Sending Modem Initialization String >"\n
- output $modeminit\13
- input 10 OK
- display \n"< Modem Initialization String accepted >"\n
- end
- #
- %n = 0
- repeat
- if %n = %attempts
- display \n\n"Unable to connect to Telalink at this time. Please try again later."\n\n
- abort
- end
- display \n"< Sending Modem Dial Command & Phone Number >"\n
- output $dialstring\13
- display \n"< Waiting for Connection to Terminal Server >"\n
- %ok = [input 60 CONNECT]
- %n = %n + 1
- until %ok
- #
- display \n"< Connected to Terminal Server >"\n
- #
- # wait for the username prompt
- #
- display \n"< Sending returns to prod the terminal server >"\n
- output \13
- output \13
- display \n"< Waiting for the username: prompt >"\n
- input 60 :
- display \n"< Sending username >"\n
- output $username\13
- #
- # and the password
- #
- display \n\n"< Waiting for password prompt >"\n
- input 60 :
- display \n\n"< Sending password >"\n
- output $passwd\13
- #
- # we are now logged in
- # wait for the PPP session message to indicate username/password acceptance
- if [input 20 login]
- display \n\n\n"** Warning! Username/password not accepted! **"\n
- display "Did you type your password correctly when you set up your software?"\n
- display \n"Password entered at setup time was: "$passwd\n\n
- display "If this is not correct, please consult your Telalink User Guide"\n
- display "or contact Telalink."\n\n
- display "Exiting login script."\n\n
- abort
- else
- display \n\n"** PPP Session enabled. Will negotiate IP address. **"\n
- end
- display "** Successfully connected to Telalink **"\n
- end
- #
- # now we are finished.
- #
-